package com.hmy.finance.service.rdto;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.hmy.finance.common.easyexcel.pojo.exportbeans.ExportSingleData;
import com.hmy.finance.dal.po.json.OverdueDetailJson;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 应收盘点
 * extends ExportSingleData用于导出excel
 *
 * @TableName receivable_Inventory
 */
@Data
public class ReceivableInventoryExportRdto extends ExportSingleData {


    /**
     * 区域code
     */
    @ExcelIgnore
    private Long saleManagerDeptId;

    /**
     * 区域名称
     */

    @ExcelProperty("区域")
    private String areaName;

    /**
     * 客户名称
     */
    @ExcelProperty("客户名称")
    @ExcelIgnore
    private String customerName;

    /**
     * 区域经理name
     */
    @ExcelProperty("区域经理")
    private String areaManagerName;

    /**
     * 销售经理name
     */
    @ExcelProperty("销售经理")
    private String saleManagerName;

    /**
     * 承租人1
     */
    @ExcelProperty("承租方1")
    private String lesseeFirst;

    /**
     * 承租人2
     */
    @ExcelProperty("承租方2(客户企业名称)")
    private String lesseeSecond;

    /**
     * 销售合同编号
     */
    @ExcelProperty("合同编号")
    private String contractNo;

    /**
     * 合同签署时间
     */
    @ExcelProperty("合同签署时间")
    private LocalDateTime contractSignTime;

    /**
     * 结算方式描述
     */
    @ExcelProperty("结算方式")
    private String settlementMethodDesc;


    /**
     * 账期
     */
    @ExcelProperty("账期")
    private String accountPeriod;

    /**
     * 截止时间
     */
    @ExcelProperty("截止时间")
    private String deadTime;

    /**
     * 总营收
     */
    @ExcelProperty("应收总额-营业额")
    private BigDecimal totalRevenueAmount;

    /**
     * 已开票金额
     */
    @ExcelProperty("已开票金额")
    private BigDecimal totalInvoicedAmount;

    /**
     * 已对账总额
     */
    @ExcelProperty("已对账金额")
    private BigDecimal totalReconciliationedAmount;

    /**
     * 未对账总额
     */
    @ExcelIgnore
    @ExcelProperty("未对账金额")
    private BigDecimal totalUnreconciliationAmount;

    /**
     * 最后一次回款时间
     */
    @ExcelProperty("最近回款时间")
    private LocalDateTime lastReceivedTime;

    /**
     * 已回款总额
     */
    @ExcelProperty("已回款总额")
    private BigDecimal totalReceivedAmount;

    /**
     * 应收余额合计
     */
    @ExcelProperty("应收余额合计")
    private BigDecimal totalReceivableAmount;


    /**
     * 未到期金额
     */
    @ExcelProperty("未到期金额总计")
    private BigDecimal unexpiredAmount;


    /**
     * 逾期1-30天
     */
    @ExcelProperty("逾期0-30天金额(元)")
    private BigDecimal overdueAmount30 = BigDecimal.ZERO;

    /**
     * 逾期31-60天
     */
    @ExcelProperty("逾期31-60天金额(元)")
    private BigDecimal overdueAmount60 = BigDecimal.ZERO;

    /**
     * 逾期61-90天
     */
    @ExcelProperty("逾期61-90天金额(元)")
    private BigDecimal overdueAmount90 = BigDecimal.ZERO;

    /**
     * 逾期61-90天
     */
    @ExcelProperty("逾期91天以上金额(元)")
    private BigDecimal overdueAmount91 = BigDecimal.ZERO;


    /**
     * 当期金额
     */
    @ExcelProperty("当期金额总计")
    private BigDecimal currentAmount;

    /**
     * 逾期总计
     */
    @ExcelProperty("逾期总计")
    private BigDecimal totalOverdueAmount;


    @ExcelIgnore
    private List<OverdueDetailJson> overdueDetail;


    public static List<List<String>> excelHead() {
        List<List<String>> heads = new ArrayList<>();
        return heads;
    }

}